package no.sachmuld.methodcombination.api.reflection;

import no.sachmuld.methodcombination.api.reflection.component.SimpleMethodCombination;

import java.util.ArrayList;
import java.util.List;

/**
*
*/
public class Append<E> extends SimpleMethodCombination<Object, List<E>, List<E>> {

    private java.util.List<E> combinedResult = new ArrayList<>();

    @Override
    protected boolean handleSingleResult(java.util.List<E> singleResult) {
        combinedResult.addAll(singleResult);
        return true;
    }

    @Override
    protected java.util.List<E> combinedResult() {
        return combinedResult;
    }
}
